# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: combination_demo.py
@time: 2021/01/31
"""
import sys

class Processor:
    x = 10
    def __init__(self,read,write):
        self.read = read
        self.write = write

    def processor(self):
        while True:
            ...
            data = self.read.readline()
            if not data:
                break
            last_data = self.converter(data)
            self.write.write(last_data)

    def converter(self,data):
        assert False, "cur menthod not run!!!"


class SuperProcessor(Processor):


    def __init__(self, read, write):
        super().__init__(read, write)

    def converter(self,data):
        ...
        return data.upper()


class ReadMessage:



    def readline(self):
        return input("请输入:")



def test01():
    ...
    processor = SuperProcessor(ReadMessage(),sys.stdout)
    # processor.processor()
    print(getattr(processor, 'x'))



if __name__ == '__main__':
    pass
    test01()
